import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while (1):
    ret,frame=cap.read()
    frame = cv2.GaussianBlur(frame, (5, 5), 0)
    hsv=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
    circles = cv2.HoughCircles(hsv, cv2.HOUGH_GRADIENT, 1, 20, param1=100, param2=40, minRadius=0, maxRadius=0)
    if circles is not None:
        for i in circles[0,:]:
            cv2.circle(hsv,(int(i[0]),int(i[1])),int(i[2]),(0,255,0),2)
            cv2.circle(hsv,(int(i[0]),int(i[1])),2,(0,255,0),2)
    cv2.imshow("sss",hsv)
    k=cv2.waitKey(50)
    if k==27:
        break